home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************\
-
- Module: IRS_Methods.c
-
- Purpose: renderer top level QD3D metahandler functions
-
- Author: Sun-Inn Shih
-
- Copyright (C) 1993-96 Apple Computer, Inc. All rights reserved.
-
- \*****************************************************************************/
- #include <stdlib.h>
- #include <stdio.h>
- #include <QD3D.h>
- #include <QD3DGeometry.h>
- #include <QD3DView.h>
- #include <QD3DDrawContext.h>
- #include "IRS_Methods.h"
-
- /*===========================================================================*\
- *
- * Routine: PFNew()
- *
- * Comments:
- *
- \*===========================================================================*/
-
- TQ3Status IRSNew(
- TQ3RendererObject pRenderer,
- irsData *irsdata,
- void *pInitData)
- {
- (void)(pInitData);
- (void)(pRenderer);
- return kQ3Success;
- }
-
- /*===========================================================================*\
- *
- * Routine: PFDelete()
- *
- * Comments:
- *
- \*===========================================================================*/
-
- void IRSDelete(
- TQ3RendererObject pRenderer,
- irsData *irsdata)
- {
- (void)(pRenderer);
- (void)(irsdata);
-
- }
-
- /*===========================================================================*\
- *
- * Routine: IRSStartFrame()
- *
- * Comments:
- *
- \*===========================================================================*/
-
- TQ3Status IRSStartFrame(
- TQ3ViewObject pView,
- irsData *irsdata,
- TQ3DrawContextObject pQD3DDrawContext)
- {
- TQ3DrawContextObject DrawContext ;
- if ( Q3View_GetDrawContext ( pView , &DrawContext ) != kQ3Failure )
- {
- TQ3DrawContextData Data ;
- if ( Q3DrawContext_GetData ( DrawContext , &Data ) != kQ3Failure )
- {
- Rect R ;
- R.left = Data.pane.min.x ;
- R.right = Data.pane.max.x ;
- R.top = Data.pane.min.y ;
- R.bottom = Data.pane.max.y ;
- CWindowPtr Window ;
- if ( Q3MacDrawContext_GetWindow ( DrawContext , &Window ) != kQ3Failure )
- {
- SetPort ( ( GrafPort* ) ( Window ) ) ;
- EraseRect ( &R ) ; //Window->portRect ) ;
- }
- }
- } ;
- /* if(irsdata->filePtr == NULL)
- {
- irsdata->filePtr = fopen("IRShelloutput.ps", "w");
- }
-
- fprintf(irsdata->filePtr, "%%!PS-Adobe-3.0\n");
- fprintf(irsdata->filePtr, "0 setgray\n");
- fprintf(irsdata->filePtr, "1 setlinecap\n");
- fprintf(irsdata->filePtr, "1 setlinejoin\n");
- */
- return kQ3Success;
- }
-
- /*===========================================================================*\
- *
- * Routine: IRSEndFrame()
- *
- * Comments:
- *
- \*===========================================================================*/
-
- TQ3Status IRSEndFrame(
- TQ3ViewObject pView,
- irsData *irsdata,
- TQ3DrawContextObject pQD3DDrawContext)
- {
- /*
- if(irsdata->filePtr != NULL)
- {
- fprintf(irsdata->filePtr, "stroke\n");
- fprintf(irsdata->filePtr, "showpage\n");
- fclose(irsdata->filePtr);
- irsdata->filePtr = NULL;
- }
- */
- return kQ3Success;
- }
-
- /*===========================================================================*\
- *
- * Routine: IRSStartPass()
- *
- * Comments:
- *
- \*===========================================================================*/
-
- TQ3Status IRSStartPass(
- TQ3ViewObject pView,
- irsData *irsdata,
- TQ3CameraObject pCamera,
- TQ3GroupObject pLightGroup)
- {
- return kQ3Success;
- }
-
- /*===========================================================================*\
- *
- * Routine: IRSEndPass()
- *
- * Comments:
- *
- \*===========================================================================*/
-
- TQ3ViewStatus IRSEndPass(
- TQ3ViewObject pView,
- irsData *irsdata)
- {
- return kQ3ViewStatusDone;
- }
-
-
- /*===========================================================================*\
- *
- * Routine: IRSCancel()
- *
- * Comments:
- *
- \*===========================================================================*/
-
- void IRSCancel(
- TQ3ViewObject pView,
- irsData *irsdata)
- {
- (void)(pView);
- }
-
-